# -*- coding: utf-8 -*- 
#引入系统包
import sys
import os
sys.path.append(os.path.normpath(os.path.join(os.getcwd(), os.path.pardir)))
#引入Qt包
from PyQt5 import QtCore , QtWidgets, QtGui
from PyQt5.QtGui import QPixmap, QIcon
#引入自定义包
#包-模块-类
from ui.mainWindow import mainWindow
from ui.login.loginWindow import loginWindow	
from resources import qrc_resources
from bmlog.bmLogger import bmLogger
#建立应用
app = QtWidgets.QApplication(sys.argv)
app.setWindowIcon(QIcon(":/img/images/options.png"))
#设置日志
logger = bmLogger.getInstance().bmloger
logger.info("应用程序已启动")
loginWindow = loginWindow()
logger.info("打开登录窗口")
if(loginWindow.exec_()):
    #loginWindow.show()
    logger.info("主窗口打开")
    mWindow = mainWindow()
    mWindow.show()
    sys.exit(app.exec_())    
else:
    pass

